package org.example.thymeleaf.demo.demos.entity;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2024-09-24 09:35:53
 */
@Data
@SuppressWarnings("serial")
@TableName("user")
@AllArgsConstructor
@NoArgsConstructor
@SearchBean(tables = "user u left join city c on u.id = c.user_id")
public class User {

    @DbField("u.id")
    private Integer id;

    @DbField("u.name")
    private String name;

    @DbField("u.age")
    private Integer age;

    @DbField("u.sex")
    private String sex;

    @DbField("u.city")
    private String city;

    @DbField("c.school")
    private String school;

}

